package com.schedule.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.schedule.mapper.AdminRoleMapper;
import com.schedule.pojo.AdminRole;
import com.schedule.service.IAdminRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author star
 * @since 2022-02-12
 */
@Service
public class AdminRoleServiceImpl extends ServiceImpl<AdminRoleMapper, AdminRole> implements IAdminRoleService {


    @Autowired
    private AdminRoleMapper adminRoleMapper;


    /**
     * 删除用户-角色信息
     * @return
     */
    @Override
    public Integer deleteRecord(Integer Aid, Integer Rid) {
        return adminRoleMapper.delete(new QueryWrapper<AdminRole>()
                .eq("adminId",Aid)
                .eq("rid",Rid));

    }
}
